export class ClientMod {

    clientId?: string;
    addressList: Array<AddressList>;
    agentCode: string;
    birthDate: any;
    carOwnership: string;
    childNum: string;
    clientNum: string;
    houseType: string;
    insType: string;
    marriageType: string;
    name: string;
    occupation: string;
    otherIns: string;
    mobileList: Array<mobileList>;
    income:string;
    sex: string;
    source: string;
    age: string;
    defaultAddress: string;
    partyId: string;
    remark: string;
    houseOwnership: string;
    customerId:string;
}

export class LocalAddMod {
    addressList: [
        {
            "address": string,
            "defaultIndicator": string,
            "id": string,
            "locationLatitude": string,
            "locationLongitude": string
        }
        ];
    age: string;
    birthDate: string;
    carOwnership: string;
    childNum: string;
    defaultAddress: string;
    defaultMobile: string;
    houseOwnership: string;
    income: string;
    insType: string;
    leadId: string;
    marriageType: string;
    customerId:string;
    partyId:string;
    mobileList: [
        {
            "defaultIndicator": number,
            "id": string,
            "mobile": string
        }
        ];
    name: string;
    occupation: string;
    otherIns: string;
    postcode: string;
    remark: string;
    sex: string;
    source: string;
    public static ModelToLocal(mod1: ClientMod) {
        const mod2 = new LocalAddMod();

        // mod2.mobileList = mod1.mobileList;
        // mod2.addressList = mod1.addressList;
        // mod2.clientId = mod1.clientId;
        // mod2.marriageType = mod1.marriageType;
        // mod2.childNum = mod1.childNum;
        // mod2.clientId = mod1.clientId;
        // mod2.carOwnership = mod1.carOwnership;

        return mod2;
    }
}

export class mobileList {
    defaultIndicator: any;
    id: string;
    mobile: string;
    isDel:boolean=false;
}

export class Client {
    client = {
        "clientID": 1,
        "addressList": [
            {
                "address": "dizhi",
                "postCode": "22"
            }
        ],
        "agentCode": "",
        "birthDay": "",
        "carType": "",
        "childNum": "",
        "clientNum": "",
        "houseType": "",
        "insType": "",
        "marriageType": "",
        "name": "",
        "occpCode": "",
        "otherlns": "",
        "phoneList": [
            {"phone": "113131312313"}
        ],
        "salary": "",
        "sexCode": "",
        "source": ""
    }
}

export class AddressList {
    address: string;
    defaultIndicator: string;
    id: string;
    locationLatitude: string;
    locationLongitude: string;
    postCode: string;
    isDel:boolean =false;
}


